#ifndef LOGIN_H
#define LOGIN_H
#include <QWidget>
#include<QTcpSocket>
#include<QRandomGenerator>
#include"widget.h"
#include"enrollaccount.h"
#include"loginfault.h"
namespace Ui {
class login;
}

class login : public QWidget
{
    Q_OBJECT

public:
    explicit login(QWidget *parent = nullptr);
    ~login();
    bool account_null=true;
    bool secret_null=true;
    QString address="127";
    enrollaccount*ea=new enrollaccount;   //账号注册页面
    QTcpSocket* tso;
    QImage UsedImage;
    QString usedimage_path;
    QImage defaultImage;
    QString dafaultimage_path;
    QString account;
    QString secret;
    QString name;
    widget* w;
    bool accountexist=false;
    int num=1;
public:
    void init();
    void GainUsedImage();  //向服务端发送获取之前使用过的图片的信息
    void EnrollAccount();//注册账号
signals:
private slots:

    void on_account_textChanged(const QString &arg1);

    void on_secret_textChanged(const QString &arg1);

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

private:
    Ui::login *ui;
};

#endif // LOGIN_H
